//package com.ruoyi.personnel.management.department.controller;
//
//import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
//import com.ruoyi.common.core.controller.BaseController;
//import com.ruoyi.common.core.domain.AjaxResult;
//import com.ruoyi.common.core.page.TableDataInfo;
//import com.ruoyi.common.utils.poi.ExcelUtil;
//import com.ruoyi.personnel.management.department.domain.Department;
//import com.ruoyi.personnel.management.department.service.IDepartmentService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiImplicitParam;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//
///**
// * 部门信息
// * @author Drj 2021/6/28
// * 修改：lsy 2021.7.14
// */
//@RestController
//@RequestMapping("/personnel/department")
//@Api(value = "部门信息模块", tags = "部门信息接口")
//public class DepartmentController extends BaseController {
//
//    @Autowired
//    private IDepartmentService departmentService;
//    /**
//     * 获取部门列表
//     * 需前端处理形成树形结构
//     * @param department
//     * @return
//     */
//    @ApiOperationSupport(includeParameters = {"Department.departmentId", "Department.departmentName"})
//    @ApiOperation(value = "获取部门信息列表",notes = "查询所有部门列表信息")
//    @PostMapping("/list")
//    public TableDataInfo list(@RequestBody Department department) {
//        startPage();
//        List<Department> departmentList = departmentService.selectDepartmentList(department);
//        return getDataTable(departmentList);
//    }
//
//    /**
//     * 导出部门
//     *
//     * @param department
//     * @return
//     */
//    @PostMapping("/export")
//    public AjaxResult export(@RequestBody Department department) {
//        List<Department> list = departmentService.selectDepartmentList(department);
//        ExcelUtil<Department> util = new ExcelUtil<Department>(Department.class);
//        return util.exportExcel(list, "部门数据");
//    }
//
//    /**
//     * 新增部门
//     *
//     * @param department
//     * @return
//     */
//    @ApiOperation(value = "新增部门", notes = "新增部门信息")
//    @ApiImplicitParam(name = "department", value = "新增部门信息(参数:departmentId,departmentParentId,departmentName,ancestors,departmentAddress,departmentContactPhone,remark)", dataType = "Department")
//    @PostMapping("/add")
//    public AjaxResult add(@Validated @RequestBody Department department) {
//        return toAjax(departmentService.insertDepartment(department));
//    }
//
//    /**
//     * 修改部门
//     *
//     * @param department
//     * @return
//     */
//    @ApiOperation(value = "修改部门信息", notes = "修改部门信息")
//    @ApiImplicitParam(name = "department", value = "修改部门信息(参数:departmentName,ancestors,departmentAddress,departmentContactPhone,remark)", dataType = "Department")
//    @PutMapping("/edit")
//    public AjaxResult edit(@Validated @RequestBody Department department) {
//        return toAjax(departmentService.updateDepartment(department));
//    }
//
//    /**
//     * 删除部门
//     * 仅修改删除标志位
//     *
//     * @param department
//     * @return
//     */
//    @ApiOperation(value = "删除部门", notes = "删除部门,仅删除标志位")
//    @ApiImplicitParam(name = "department", value = "删除部门", dataType = "Department")
//    @PostMapping("/delete")
//    public AjaxResult delete(Department department) {
//        return toAjax(departmentService.updateDepartmentDeleteFlag(department));
//    }
//
//
//}
